<ul id="comments" data-page="1" data-id="0">
<#list page.content as comment>
    <#--<li class="clearfix comment_item item_997306">
        <div class="img"><img
                src="${c.headUrl!}">
        </div>
        <div class="info">
            <h3>${c.username!}</h3>
            <h4>${c.createTime?string('yyyy-MM-dd HH:ss')}</h4>
            <div class="com-cont">${c.content!}</div>
            <div class="rep-del hide" style="display: none;">
                <i></i>
                <a role="button" class="reply-report">举报
                </a>
                <i></i>
                <a href="javascript:;" class="btn-comment-like _j_like_comment_btn
                     ${c.thumbuplist?seq_contains(userInfo.id)?string("liked", "like")}
                " data-toid="${c.id}" data-fromid="${(userInfo.id)!-1}">
                    <span class="_j_comment_like_num">${c.thumbupnum!}</span>
                </a>
            </div>
        </div>
    </li>-->
    <div class="rev-list">
        <ul>
            <li class="rev-item comment-item clearfix">
                <div class="user"><a class="avatar" href="/u/52068941.html" target="_blank"><img
                        src="${comment.headUrl!}"
                        width="48" height="48"></a><span class="level">LV.${comment.level!}</span></div>
                <a class="useful" data-id="191407415" title="点赞">
                    <i></i><span class="useful-num">${comment.thumbupnum}</span>
                </a>
                <a class="name" href="/u/52068941.html" target="_blank">${comment.username}</a>
                <span class="s-star s-star4"></span>
                <p class="rev-txt">
                    ${comment.content}
                </p>


                <div class="rev-img">
                    <#if comment.pics ??>
                        <#list comment.pics as pic>
                       <img src= "${pic}" width="200" height="120"></a>
                        </#list>
                    </#if>
                </div>

                <div class="info clearfix">
                    <a class="btn-comment _j_comment" title="添加评论"
                       data-toid="${comment.id}"  data-fromid="${(userinfo.id)!-1}">评论</a>
                    <span class="time">${comment.createTime?string("yyyy-MM-dd HH:mm")}</span>
                </div>

                <div class="comment add-reply ">
                    <#if comment.refComment.content ??>
                        <ul class="more_reply_box comment_list">
                        <li>
                            <a href="/u/63107989.html" target="_blank">
                                <img src="${comment.refComment.headUrl}"
                                     width="16" height="16">${comment.refComment.username}
                            </a>
                            ${comment.refComment.content}
                            <a class="_j_reply re_reply" data-id="625204" data-uid="63107989"
                               data-username="${comment.refComment.username}" title="添加回复">回复</a>
                            <br><span class="time">${comment.refComment.createTime?string("yyyy-MM-dd HH:mm:ss")}</span>
                        </li>
                        <#--<li>
                            <a href="/u/52068941.html" target="_blank">
                                <img src="http://b1-q.mafengwo.net/s10/M00/3D/07/wKgBZ1neKm2AcOhrAB5yLMoWpHI47.jpeg?imageMogr2%2Fthumbnail%2F%2116x16r%2Fgravity%2FCenter%2Fcrop%2F%2116x16%2Fquality%2F90"
                                     width="16" height="16">红袖·紫月
                            </a>
                            回复🍓辣辣辣辣王🍓：十几分钟吧
                            <a class="_j_reply re_reply" data-id="638560" data-uid="52068941"
                               data-username="红袖·紫月" title="添加回复">回复</a>
                            <br><span class="time">2019-07-01 14:18:01</span>
                        </li>-->
                    </ul>
                    </#if>
                    <form action="/shop/reply" id="replyForm" method="post">
                        <input type="hidden" name="type" id="replyType" value="1">
                        <input type="hidden" name="objectId" value="${comment.id}">
                        <input type="hidden" name="detailId" value="${comment.detailId}">
                        <input type="hidden" name="detailTitle" value="${comment.detailTitle}">
                        <div class="add-comment hide reply-form" style="display: none">
                                            <textarea class="comment_reply" data-comment_id="${comment.id}" name="content" id="content"
                                                      data-comment_username="${comment.username}" data-poi_id="${comment.detailId}" data-poi_name="${comment.detailTitle}"
                                                      data-parent_id="" data-parent_uid="" data-parent_username=""
                                                      style="overflow: hidden; color: rgb(204, 204, 204);"></textarea>
                            <a class="btn btn_submit_reply" >回复</a>
                        </div>
                    </form>
                </div>
            </li>
        </ul>
    </div>
</#list>
    <div style="float: right">
        <div style="float: left;" ><span style="line-height:30px"> 共${page.totalPages!}页 / ${page.totalElements}条&nbsp;&nbsp;&nbsp;</span></div>
        <div id="pagination" class="jq-pagination" style="display: inline;"></div>
    </div>
    <script>
        $("#pagination").jqPaginator({
            totalPages: ${page.totalPages!0},
            visiblePages: 5,
            currentPage: ${page.number+1}||1,
                prev: '<a class="prev" href="javascript:void(0);">上一页<\/a>',
                next: '<a class="next" href="javascript:void(0);">下一页<\/a>',
                page: '<a href="javascript:void(0);">{{page}}<\/a>',
                last: '<a class="last" href="javascript:void(0);" >尾页<\/a>',
                onPageChange: function(page, type) {
            if(type == 'change'){
                $("#currentPage").val(page);
                $("#searchForm").submit();
            }

        }
        })
    </script>
<script>
   /* $('.info').on("mouseout", function () {
        $(this).find(".rep-del").css("display", "none");
    }).on("mouseover", function () {
        $(this).find(".rep-del").css("display", "block");
    })

    //点赞
    $("._j_like_comment_btn").click(function () {
        var _this = $(this);

        var toid = $(this).data("toid");
        var fromid = $(this).data("fromid");
        $.get("/strategy/commentThumbUp", {toid:toid, fromid:fromid}, function (data) {

            $("#searchForm").submit();
        })
    })*/
   //点击弹出回复框
   $("._j_comment").click(function () {
      $(".reply-form").css("display", "block");
       var toid = $(this).data("toid");
       var fromid = $(this).data("fromid");
       console.log(toid);
       console.log(fromid);
       $(".comment_reply").focus()
       var p = $(this).parents("li");
       var find = p.find(".reply-form");
       find.css("display", "block")
       var reply = find.find(".comment_reply");
       reply.focus();
       $(this).parents("li").find(".reply-form").css("display", "block");
       var reply = $(this).parents("li").find(".reply-form").find(".comment_reply");
       reply.attr("placeholder","发表评论:")
       $("#content").val("")
       reply.focus();
       $("#replyType").val(1);
       $("#content").val()
   })

   $(".btn_submit_reply").click(function () {
       $("#replyForm").ajaxSubmit(function (data) {
           if(data.success){
               $("#content").val()
               $("#searchForm").submit();
           }else {
               popup("评论失败!")
           }
       })
   })
</script>
</ul>